< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03080104.xhp

(section: tan) (bookmark: bm_id3148550)
Tan function

Tan 関数

Tan Function [Runtime]
Tan 関数 [実行時](hd_id3148550.1)

Determines the tangent of an angle. The angle is specified in radians.
角度のタンジェントを指定します。 角度はラジアン単位で指定します。(par_id3148663.2)

(/section: tan)

Using the angle Alpha, the Tan Function calculates the ratio of the length of the side opposite the angle to the length of the side adjacent to the angle in a right-angled triangle.
たとえば角度αの Tan 値は、角度αを 1 つの頂角とする直角三角形を想定して、この頂点に隣接する辺と対辺の長さの比 (対辺÷隣接する辺) として計算します。(par_id3153379.3)

Tan(Alpha) = side opposite the angle/side adjacent to angle
Tan (α) = 頂点αの対辺の長さ/頂点αに隣接する辺の長さ(par_id3154366.4)

Syntax:
構文:(hd_id3145174.5)

Tan (Number)
Tan (Number)(par_id3151042.6)

Return value:
戻り値:(hd_id3156214.7)

Double
倍精度(par_id3156281.8)

Parameters:
パラメータ:(hd_id3155132.9)

Number: Any numeric expression that you want to calculate the tangent for (in radians).
Number: Tan 値を計算させる角度を示す数値表式 (単位はラジアン)。(par_id3145786.10)

To convert degrees to radians, multiply by Pi/180. To convert radians to degrees, multiply by 180/Pi.
通常の角度をラジアン値に変換するには、角度×π/180 と計算します。ラジアン値を通常の角度に変換するには、ラジアン値×180/π と計算します。(par_id3153728.11)

degrees=(radiant*180)/Pi
度数=(ラジアン*180)/Pi(par_id3155414.12)

radiant=(degrees*Pi)/180
ラジアン=(度数*Pi)/180(par_id3146975.13)

Pi is approximately 3.141593.
ここで pi は近似値で 3.141593 という値です。(par_id3147434.14)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3149483.15)

REM In this example, the following entry is possible for a right-angled triangle:
REM この例では、直角三角形を想定しています。(par_id3148646.16)

REM The side opposite the angle and the angle (in degrees) to calculate the length of the side adjacent to the angle:
REM ここでは 1 つの頂角 (通常の角度) とその対辺の長さから、この頂点に隣接する辺の長さを計算しています。(par_id3150012.17)

Sub ExampleTangens
Sub ExampleTangens(par_id3151115.18)

REM Pi = 3.1415926 is a pre-defined variable
REM Pi = 3.1415926 は事前定義されている定数(par_id3153158.19)

Dim d1 as Double
Dim d1 as Double(par_id3145800.20)

Dim dAlpha as Double
Dim dAlpha as Double(par_id3150417.21)

d1 = InputBox$ ("Enter the length of the side opposite the angle: ","opposite")
d1 = InputBox$ ("Enter the length of the side opposite the angle:","opposite")(par_id3145252.22)

dAlpha = InputBox$ ("Enter the Alpha angle (in degrees): ","Alpha")
dAlpha = InputBox$ ("Enter the Alpha angle (in degrees):","Alpha")(par_id3149582.23)

Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))
Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))(par_id3154016.24)

End Sub
End Sub(par_id3154731.25)


< Prev / Next >